<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>Chart.ClearTypeColor</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1"><a href="Chart.htm">Chart</a>.<wbr>ClearTypeColor</p>
<hr class="separator">
<p class="heading2a">Usage</p>
<div class="content">
public static int ClearTypeColor([ double gamma ])
</div>
<p class="heading2">Description</p>
<div class="content">
Gets a value to represent that standard ClearType or a similar technology be used for drawing text.<br><br>
This constant is used in <a href="BaseChart.setAntiAlias.htm">BaseChart.setAntiAlias</a> and <a href="DrawArea.setAntiAlias.htm">DrawArea.setAntiAlias</a>.<br><br>
ClearType is a Microsoft font rendering technology that renders text more accurately with subpixel rendering. Similar technologies include Quartz in Mac OS X, Adobe CoolType and other unnamed algorithms. Although this API uses ClearType in its name, ChartDirector may use ClearType or a similar technology depending on the operating system and programming language.<br><br>
In most modern flat panel displays, a pixel is consisted of 3 sub-pixels R, G and B for the red, green and blue colors, typically arranged horizontally. So a row of pixels is actually a sequence of subpixels like RGBRGBRGBRGB... To display a white pixel, the display hardware turns on the RGB subpixels.<br><br>
It happens a white dot can also be made by turning on the GB subpixels of one pixel, and the R subpixel of the next pixel to the right. This will result in 3 consecutive subpixels GBR, which is also white. This white dot will be in between the two pixels, with 2/3 on the left pixel, and 1/3 on the right pixel. In other words, it is possible to position a white dot in between two pixels without blurring it. ClearType uses this effect to render text with subpixel accuracy.<br><br>
Apart from subpixel rendering, ClearType may adjust the glyph shapes to fit the pixel grid (technically called hinting) differently from classical rendering. As a result, the glyph shapes and sizes in ClearType may be different from classical rendering.<br><br>
One issue with ClearType is that it is hardware dependent. To work perfectly, it needs to know the subpixels ordering of the display. In many applications, the charts are rendered on one computer, but viewed using another computer. For example, in a web application, the charts can be rendered on the server but displayed on the browser computer. The chart generating computer may not know the subpixel configuration of the viewing computer. If ClearType is used, there is a risk that the text may look suboptimal on the viewing computer.<br><br>
To address the above issues, ChartDirector supports a monochrome ClearType method, represented by <a href="Chart.ClearTypeMono.htm">ClearTypeMono</a>. This is basically ClearType with subpixel rendering disabled. The resulting text has no color distortion. Black and white text will not be as sharp as standard ClearType, but is still better than classical anti-alias. The charts rendered can be viewed equally well with different types of displays. This is especially useful for applications in which the charts are rendered and viewed by different computers.
</div>
<p class="heading2">Arguments</p>
<div class="content">
<div style="width:100%;box-sizing:border-box;">
<table border="1" cellpadding="5" cellspacing="0" width="100%"> 
<tr>
<th width="19%">Argument</th><th width="19%">Default</th><th>Description</th>
</tr>
<tr>
<td>gamma</td><td>0</td><td>Specifies the level of gamma correction used for ClearType font rendering. This is usually a number between 1 to 2.5. A value of 0 means the default gamma level.</td>
</tr>
</table>
</div>
</div>
<p class="heading2">Return Value</p>
<div class="content">
An integer representing that standard ClearType or a similar technology be used for font rendering.
</div>
<br><hr class="separator">
<div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
